//
//  SYimageViewAddLable.m
//  BSHOUYIFANG
//
//  Created by 曹雁彬 on 15/8/13.
//  Copyright (c) 2015年 CYB. All rights reserved.
//

#import "SYimageViewAddLable.h"
#import "Header.h"

@implementation SYimageViewAddLable

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UITapGestureRecognizer *tapView1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
         UITapGestureRecognizer *tapView = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
        
        _bmgView1 = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, (SCREEN_WIDTH-30)/2, frame.size.height-35)];
       // _bmgView1.backgroundColor = [UIColor cyanColor];
        _bmgView1.userInteractionEnabled = YES;
        _bmgView1.tag = 3001;
        [_bmgView1 addGestureRecognizer:tapView1];

        
        _bmgView2 = [[UIImageView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/2+20, 0, (SCREEN_WIDTH-30)/2, frame.size.height-35)];
        // _bmgView2.backgroundColor = [UIColor cyanColor];
        _bmgView2.userInteractionEnabled = YES;
        _bmgView2.tag = 3002;
          [_bmgView2 addGestureRecognizer:tapView];
        
        _describe1 = [[UILabel alloc]initWithFrame:CGRectMake(10, frame.size.height-35, (SCREEN_WIDTH-30)/2, 25)];
        _describe1.textAlignment = NSTextAlignmentCenter;
        

        // _describe1.backgroundColor = [UIColor redColor];
        
        _describe2 = [[UILabel alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/2+20, frame.size.height-35, (SCREEN_WIDTH-30)/2, 25)];
        _describe2.textAlignment = NSTextAlignmentCenter;
        // _describe2.backgroundColor = [UIColor redColor];
        
        [self addSubview:_bmgView1];
        [self addSubview:_bmgView2];
        [self addSubview:_describe1];
        [self addSubview:_describe2];
    }
    return self;
}
- (void)tap:(UITapGestureRecognizer*)tap
{
    //点击完成之后 跳转
   // UIImageView *view = [UIImageView ]
    if (_webBlock !=nil) {
        _webBlock(tap.view.tag);
    }
  
  
    //NSLog(@"sfaasf");
}
@end
